package com.dys.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * @className: com.dys.controller.PageController
 * @description: com.dys.controller
 * @author: pine cone
 * @version: v1.0.0
 * @createTime: 2024/11/13 22:15
 */
@Controller
public class PageController {
    /**
     * HOME页面
     *
     * @return 对应的页面
     */
    @RequestMapping(value = {"/", "/home"})
    public String showMain() {
        return "main";
    }

    /**
     * RestFul风格处理
     *
     * @return 访问对应的页面
     */
    @RequestMapping("/{path}")
    public String showPage(@PathVariable(value = "path") String path) {
        return path;
    }
}
